<?php
/*
 *  FireFly theme
 *  Header template
 *  (c) 2011, chugylo
 */
?>
<?php
    $templ_dir = get_template_directory_uri() . '/';

?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <meta name="keywords" content="blog" />
    <meta name="description" content="Chugylo's blog'" />
    <title><?php

    global $page, $paged;
    wp_title('|', true, 'right');

    bloginfo('name');

    if ($paged >= 2 || $page >= 2)
        echo ' | ' . sprintf(__( 'Page %s', 'firefly' ), max($paged, $page));

    ?></title>
    <link rel="shortcut icon" href="<?= site_url(); ?>/favicon.ico" />
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); echo ' - '; ?>RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); echo ' - '; ?>Atom" href="<?php bloginfo('atom_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <!--[if IE]><style type="text/css">@import url("ie.css");</style><![endif]-->
    <?php
        if (use_in_head_insertion())
            load_template(get_template_directory() .'/insertions/in_head.php');
        if (is_singular() && get_option('thread_comments'))
            wp_enqueue_script('comment-reply');
        wp_head();
    ?>
</head>
<body <?php body_class(); ?>>
    <div id="wraper">
    <div id="header">
        <h1><a href="<?= site_url(); ?>"><?php bloginfo('name'); ?></a></h1>
    </div>
    <div id="nav">
        <ul>
            <li><a href="<?= site_url(); ?>" title="<?php _e('Main page', 'firefly'); ?>"><?php _e('Main', 'firefly'); ?></a></li>
            <?php wp_list_pages('title_li='); ?>
            <li id="rss-button"><a href="<?php bloginfo('rss2_url'); ?>"><img src="<?php echo "$templ_dir/images/feed-30px.png"; ?>" alt="<?php _e('RSS', 'firefly'); ?>" title="<?php _e('RSS feed', 'firefly'); ?>" /></a></li>
        </ul>
    </div><!--end nav-->
    <div id="main">
